FROM nginx:1.23.1-alpine-perl

RUN mkdir /dist
COPY ./dist /dist

# CMD nginx -g 'daemon off;'

COPY ./nginx.conf.template /
 
CMD envsubst < /nginx.conf.template > /etc/nginx/nginx.conf \
	&& cat /etc/nginx/nginx.conf \
	&& nginx -g 'daemon off;'

